Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@stamp/shortcut
Advanced tools
Adds few handy static methods for simpler composition
By composing the @stamp/shortcut
into your stamp
MyStamp = MyStamp.compose(Shortcut);
you get few static methods. So, instead of typing
MyStamp.compose({ deepProperties: bla });
you will be able to write
MyStamp.deepProps(bla);
import Shortcut from '@stamp/shortcut';
const MyStamp = Shortcut
.methods({ myMethod() {} })
.props({ foo: 'foo' })
.deepProps({ deepFoo: { foo: 'foo 2' } })
.statics({ bar: 'bar' })
.deepStatics({ deepBar: { bar: 'bar 2' } })
.conf({ something: 'something' })
.deepConf({ deepSomething: { something: 'something' } })
.init((arg, {stamp, args, instance}) => { /* initializer */ })
.composers(({stamp, composables}) => { /* composer */ });
Or you can import each individual shortcut function:
import {
methods, props, deepProps, statics, deepStatics, conf, deepConf, init, composers
} from '@stamp/shortcut';
const Stamp1 = methods({
method1() { }
});
const Stamp2 = props({
prop2: 2
});
const Stamp3 = init(function () {
console.log(3);
});
// etc
In this case the functions will not add any static shortcut methods to your stamps, meaning that the following will throw:
methods({ method1() {} }).props(); // Error: undefined "props" is not a function
init(function () {}).init(); // Error: undefined "init" is not a function
// etc
stamp.methods(Object) -> Stamp
stamp.props(Object) -> Stamp
stamp.deepProps(Object) -> Stamp
stamp.statics(Object) -> Stamp
stamp.deepStatics(Object) -> Stamp
stamp.conf(Object) -> Stamp
stamp.deepConf(Object) -> Stamp
stamp.init(...Function) -> Stamp
stamp.composers(...Function) -> Stamp
FAQs
Adds handy shortcuts for stamp composition
The npm package @stamp/shortcut receives a total of 0 weekly downloads. As such, @stamp/shortcut popularity was classified as not popular.
We found that @stamp/shortcut demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.